package com.light.sword

import net.sf.cglib.proxy.MethodInterceptor
import net.sf.cglib.proxy.MethodProxy
import java.lang.reflect.Method
import kotlin.jvm.Throws


/**
 * @author: Jack
 * 2020-09-11 10:59
 */

class HelloProxy : MethodInterceptor {

    @Throws(Throwable::class)
    override fun intercept(obj: Any?, p1: Method?, args: Array<out Any>?, proxy: MethodProxy?): Any {
        println("Before")
        proxy?.invokeSuper(obj, args)
        println("After")
        return Any()
    }

}
